<?php
$host = '128.196.51.248';
$port = 8099;
    
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");
$result = socket_connect($socket, $host, $port) or die("Could not connect to socket\n");

$body = array();
$body['text'] = stripslashes($_POST['text']);
$body = json_encode($body);

socket_send($socket, $body, strlen($body), MSG_EOF);

socket_close($socket);

?>